package com.stylefeng.guns.modular.apple_id_manage.model;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 苹果账号表
 * </p>
 *
 * @author godrui
 * @since 2020-06-20
 */
@TableName("apple_ids")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AppleIds extends Model<AppleIds> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 账号
     */
    private String account;
    private String password;
    /**
     * 已用设备数量
     */
    @TableField("used_device_count")
    private Integer usedDeviceCount;
    /**
     * 剩余设备数量
     */
    @TableField("left_device_count")
    private Integer leftDeviceCount;

    @TableField("valid_date")
    private Date validDate;
    /**
     * 账号被封状态，0：正常，1：被封，2：账号过期
     */
    @TableField("status")
    private Integer status;
    /**
     * 账号导入时间
     */
    @TableField("import_date")
    private Date importDate;

    /**
     * 账号被封时间
     */
    @TableField("blocked_date")
    private Date blockedDate;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
